//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _ModelDetailStatistic_h__
#define _ModelDetailStatistic_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "ModelDetailAccuracy.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class ModelDetailStatistic { 

  private:

    String*                          toString;
    
  protected:

    TListE <ModelDetailAccuracy>*    detailAccuracyByClass;
    float                            rootRelativeSquareError;
    float                            relativeAbsoluteError;
    float                            rmsError;
    float                            meanAbsoluteError;
    float                            complexityImprovementPerInstance;
    float                            complexityImprovement;
    float                            classComplexitySchemePerInstance;
    float                            classComplexityScheme;
    float                            classComplexityOrderPerInstance;
    float                            classComplexityOrder;
    float                            kBInfoScoreBitsPerInstance;
    float                            kBInfoScoreBits;
    float                            kBRelativeInfoScore;
    float                            kappa;
    float                            incorrectlyClassifiedPercentage;
    float                            correctlyClassifiedPercentage;
    int                              totalNumberInstance;
    int                              incorrectlyClassifiedInstance;
    int                              correctlyClassifiedInstance;
    
    int**                            confusionMatrix;

  public:

    ModelDetailStatistic ();
    ModelDetailStatistic (const ModelDetailStatistic&);
    ModelDetailStatistic (const ModelDetailStatistic*);

    ~ModelDetailStatistic ();

    void                             DetailAccuracyByClass (TListE <ModelDetailAccuracy>* detailAccuracyByClass);
    void                             RootRelativeSquareError (float rootRelativeSquareError);
    void                             RelativeAbsoluteError (float relativeAbsoluteError);
    void                             RmsError (float rmsError);
    void                             MeanAbsoluteError (float meanAbsoluteError);
    void                             ComplexityImprovementPerInstance (float complexityImprovementPerInstance);
    void                             ComplexityImprovement (float complexityImprovement);
    void                             ClassComplexitySchemePerInstance (float classComplexitySchemePerInstance);
    void                             ClassComplexityScheme (float classComplexityScheme);
    void                             ClassComplexityOrderPerInstance (float classComplexityOrderPerInstance);
    void                             ClassComplexityOrder (float classComplexityOrder);
    void                             KBInfoScoreBitsPerInstance (float kBInfoScoreBitsPerInstance);
    void                             KBInfoScoreBits (float kBInfoScoreBits);
    void                             KBRelativeInfoScore (float kBRelativeInfoScore);
    void                             Kappa (float kappa);
    void                             IncorrectlyClassifiedPercentage (float incorrectlyClassifiedPercentage);
    void                             CorrectlyClassifiedPercentage (float correctlyClassifiedPercentage);
    void                             TotalNumberInstance (int totalNumberInstance);
    void                             IncorrectlyClassifiedInstance (int incorrectlyClassifiedInstance);
    void                             CorrectlyClassifiedInstance (int correctlyClassifiedInstance);
    void                             ConfusionMatrix (int** confusionMatrix);

    TListE <ModelDetailAccuracy>*    DetailAccuracyByClass (void);
    float                            RootRelativeSquareError (void);
    float                            RelativeAbsoluteError (void);
    float                            RmsError (void);
    float                            MeanAbsoluteError (void);
    float                            ComplexityImprovementPerInstance (void);
    float                            ComplexityImprovement (void);
    float                            ClassComplexitySchemePerInstance (void);
    float                            ClassComplexityScheme (void);
    float                            ClassComplexityOrderPerInstance (void);
    float                            ClassComplexityOrder (void);
    float                            KBInfoScoreBitsPerInstance (void);
    float                            KBInfoScoreBits (void);
    float                            KBRelativeInfoScore (void);
    float                            Kappa (void);
    float                            IncorrectlyClassifiedPercentage (void);
    float                            CorrectlyClassifiedPercentage (void);
    int                              TotalNumberInstance (void);
    int                              IncorrectlyClassifiedInstance (void);
    int                              CorrectlyClassifiedInstance (void);
    int**                            ConfusionMatrix (void);

    String*                          ToString (int);
    String*                          ToString (void);
    String*                          ToStringConfusionMatrix (void);
    bool                             LoadFromData (String* data);

    ModelDetailStatistic             operator= (const ModelDetailStatistic& modelDetailStatistic);

};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
